﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace ServerNodeLib
{
	/// <summary>
	/// When you add a template, you're creating a batch group in the server
	/// These are batches that are logically related to each other
	/// </summary>
	[Serializable()]
	public class BatchGroup
	{
		public BatchGroup()
		{
			this.GroupId = Guid.NewGuid();
			this.StartTime = DateTime.MinValue;
			this.EndTime = DateTime.MaxValue;
			this.Comment = String.Empty;
			this.TotalBatches = 0;
			this.CompleteBatches = 0;
			this.RemainingBatches = 0;
			this.State = BatchStatus.NotStarted;
			this.OutputDirectory = String.Empty;
		}
		public Guid GroupId;
		public DateTime StartTime;
		public DateTime EndTime;
		public String Comment;
		public Int32 TotalBatches;
		public Int32 CompleteBatches;
		public Int32 RemainingBatches;
		public BatchStatus State;
		public String OutputDirectory;
		/*
		public String GetDirectoryName()
		{
			return String.Format("({4}) {0} {1} {2} {3}", StartTime.ToLongDateString(), StartTime.Hour, StartTime.Minute, StartTime.Second, Comment);
		}
		*/
		public override string ToString()
		{
			return Comment;
		}
	}
}